{% extends 'blog/base.html' %}
{% block css %}
    <link rel="stylesheet" href="/static/css/list.css">
    <script type="text/javascript" src="static/js/jquery.js"></script>
    <script type="text/javascript" src="static/js/list.js" ></script>
{% endblock css %}

{% block content %}
    <div class="contant">
        <div class="title">
            <div class="text">
                购物清单
            </div>
        </div>
        <div class="time">
            {{ time }}
        </div>
        <table>
            <tr>
                <th>分类</th>
                <th>名称</th>
                <th>单价(元)</th>
                <th>单位</th>
                <th>数量</th>
                <th>小计</th>
            </tr>
            {% for post in posts %}
                <tr>
                    <td> {{ post.sort}}</td>
                    <td>{{ post.name}}</td>
                    <td>{{ post.price }}</td>
                    <td>{{ post.unit }}</td>
                    <td>{{ post.counts }}</td>
                    <td>{{ post.subtotal }}</td>
                </tr>
            {% endfor %}
        </table>
        <div class="save">
            <div class="gift">
                赠送商品
            </div>
        </div>
        <table>
            <tr>
                <th>分类</th>
                <th>名称</th>
                <th>数量</th>
            </tr>
            {% for p in save %}
                <tr>
                    <td> {{ p.sort}}</td>
                    <td>{{ p.name}}</td>
                    <td>{{ p.send }}</td>
                </tr>
            {% endfor %}
        </table>
        <div class="sum">总计:{{ total }} 元</div>
        <div class="retrench">节省:{{ saving }} 元</div>
        <div class="button"><button class="hit">确定</button></div>
    </div>
{% endblock content %}